package com.atguigu.test.demo;

public class Fruit {
    /** 库存 */
    private Integer stock = 1000;


    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public void sale() {
        while (getStock() > 0) {

        }
    }
}
